JBoss Community Archive (Read Only)

Teiid 8.3

System Procedures

SYS.getXMLSchemas

Returns a resultset with a single column, schema, containing the schemas as clobs.

SYS.getXMLSchemas(document in string) returns schema string

SYSADMIN.logMsg

Log a message to the underlying logging system.

SYSADMIN.logMsg(logged RETURN boolean, level IN string, context IN string, msg IN object)

Returns true if the message was logged. level can be one of the log4j levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE. level defaults to 'DEBUG' and context defaults to 'org.teiid.PROCESSOR'

Example logMsg
CALL SYSADMIN.logMsg(msg=>'some debug', context=>'org.something')

This will log the message 'some debug' at the default level DEBUG to the context org.something.

SYSADMIN.isLoggable

Tests if logging is enabled at the given level and context.

SYSADMIN.isLoggable(loggable RETURN boolean, level IN string, context IN string)

Returns true if logging is enabled. level can be one of the log4j levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE. level defaults to 'DEBUG' and context defaults to 'org.teiid.PROCESSOR'

Example isLoggable
IF ((CALL SYSADMIN.isLoggable(context=>'org.something'))
BEGIN
   DECLARE STRING msg;
   // logic to build the message ...
   CALL SYSADMIN.logMsg(msg=>msg, context=>'org.something')
END

SYSADMIN.refreshMatView

Returns integer RowsUpdated. -1 indicates a load is in progress, otherwise the cardinality of the table is returned. See the Caching Guide for more.

SYSADMIN.refreshMatView(RowsUpdated return integer, ViewName in string, Invalidate in boolean)

SYSADMIN.refreshMatViewRow

Returns integer RowsUpdated. -1 indicates the materialized table is currently invalid. 0 indicates that the specified row did not exist in the live data query or in the materialized table. See the Caching Guide for more.

SYSADMIN.refreshMatViewRow(RowsUpdated return integer, ViewName in string, Key in object)

Metadata Procedures

A MetadataRepository must be configured to make a non-temporary metadata update persistent. See the Developer's Guide Runtime Metadata Updates section for more.

SYSADMIN.setTableStats

Set statistics for the given table.

SYSADMIN.setTableStats(TableName in string, Cardinality in integer)

SYSADMIN.setColumnStats

Set statistics for the given column.

SYSADMIN.setColumnStats(TableName in string, ColumnName in string, DistinctCount in integer, NullCount in integer, Max in string, Min in string)

All stat values are nullable. Passing a null stat value will leave corresponding metadata value unchanged.

SYSADMIN.setProperty

Set an extension metadata property for the given record. Extension metadata is typically used by Translators.

SYSADMIN.setProperty(OldValue return clob, Uid in string, Name in string, Value in clob)

Setting a value to null will remove the property.

Example Property Set
CALL SYSADMIN.setProperty(uid=>(SELECT uid FROM TABLES WHERE name='tab'), name=>'some name', value=>'some value')

This will set the property 'some name'='some value' on table tab.

The use of this procedure will not trigger replanning of associated prepared plans.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 12:38:27 UTC, last content change 2013-03-14 16:27:57 UTC.